
#include <mockcpp/mockcpp.hpp>
#include <testngpp/testngpp.hpp>
#include "Square.h"

USING_MOCKCPP_NS
USING_TESTNGPP_NS

FIXTURE(Square)
{
    TEST(should be able to set and get side)
    {
        Square sqr(0.0);
        sqr.setSide(3.0);
        ASSERT_EQ(3.0, sqr.getSide());
        ASSERT_EQ(3.0 * 3.0, sqr.getArea());
    }

    TEST(should be able to calculate perimeter)
    {
        Square sqr(3.0);
        ASSERT_EQ(4 * 3.0, sqr.getPerimeter());
    }

    TEST(should be able to calculate area)
    {
        Square sqr(3.0);
        ASSERT_EQ(3.0 * 3.0, sqr.getArea());
    }
};

